Skip to content

ci(docker): sync Docker Hub overview from DOCKERHUB.md#61

Merged
cevheri merged 5 commits into
mainfrom
ci/dockerhub-readme
Jun 14, 2026
Merged

ci(docker): sync Docker Hub overview from DOCKERHUB.md#61
cevheri merged 5 commits into
mainfrom
ci/dockerhub-readme

Conversation

@cevheri

@cevheri cevheri commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Mirrors the GitHub-maintained DOCKERHUB.md to the Docker Hub repository overview on every main build, so visitors to hub.docker.com/r/libredb/libredb-studio see a proper landing page.

  • DOCKERHUB.md — Docker-Hub-tailored README with absolute raw.githubusercontent.com image URLs (relative paths render broken on Docker Hub), quick start, image-tag table, supported DBs, env vars, deploy links.
  • dockerhub-readme jobpeter-evans/dockerhub-description (pinned to v5.0.0 SHA), gated on github.ref == main && vars.DOCKER_HUB_USERNAME != '' (fork-safe).
  • Verified the configured DOCKER_HUB_TOKEN PAT authenticates against the Docker Hub API (login → 200), so the description PATCH will succeed.

After merge, the main build syncs the overview automatically.

Add a Docker-Hub-tailored README (DOCKERHUB.md) with absolute image URLs
(relative paths don't render on Docker Hub) and a dockerhub-readme job that
mirrors it to the Docker Hub repository overview after each main build via
peter-evans/dockerhub-description (pinned). Gated on main + DOCKER_HUB_USERNAME
so forks are unaffected. Verified the configured PAT authenticates against the
Docker Hub API (login 200).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment thread .github/workflows/docker-build-push.yml Fixed
cevheri and others added 2 commits June 14, 2026 03:33
…dme job

Resolves CodeQL 'Workflow does not contain permissions' — the job only
checks out the repo (the Docker Hub update uses DOCKER_HUB_TOKEN), so
contents: read is sufficient.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Mirrors a Docker-Hub-optimized README (DOCKERHUB.md) to the Docker Hub repository overview via a new CI job, so Docker Hub visitors see a proper landing page kept in sync with main.

Changes:

  • Bump NPM package version to 0.9.16.
  • Add DOCKERHUB.md with Docker-Hub-friendly formatting (absolute image URLs, quick start, tags, env vars, links).
  • Add a dockerhub-readme workflow job to sync DOCKERHUB.md to Docker Hub on main.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
package.json Version bump to 0.9.16.
DOCKERHUB.md Adds Docker Hub overview content (quick start, tags, supported DBs, env vars, links).
.github/workflows/docker-build-push.yml Adds a job to sync Docker Hub README from DOCKERHUB.md after main builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread DOCKERHUB.md
Comment on lines +33 to +37
-e ADMIN_EMAIL=admin@libredb.org \
-e ADMIN_PASSWORD=LibreDB.2026 \
-e USER_EMAIL=user@libredb.org \
-e USER_PASSWORD=LibreDB.2026 \
-e JWT_SECRET=change-me-to-a-random-32-char-string \
Comment thread DOCKERHUB.md Outdated
libredb/libredb-studio:latest
```

Open <http://localhost:3000> and log in with `admin@libredb.org` / `LibreDB.2026`.
Comment thread DOCKERHUB.md Outdated
| Tag | Pushed from | Use |
|-----|-------------|-----|
| `latest` | `main` | Latest stable build |
| `X.Y.Z` (e.g. `0.9.15`) | `main` / release | Pin a specific version (recommended for production) |
Comment thread DOCKERHUB.md Outdated
- **DeepWiki docs:** <https://deepwiki.com/libredb/libredb-studio>
- **License:** MIT

<sub>This page is generated from <a href="https://github.com/libredb/libredb-studio/blob/main/DOCKERHUB.md">DOCKERHUB.md</a> and synced automatically on each release.</sub>
Comment on lines +174 to +178
dockerhub-readme:
name: Sync Docker Hub README
needs: build-and-push
if: ${{ github.ref == 'refs/heads/main' && vars.DOCKER_HUB_USERNAME != '' }}
runs-on: ubuntu-latest
cevheri and others added 2 commits June 14, 2026 03:40
- DOCKERHUB.md: use placeholder passwords in the docker run quick start
  (was hardcoded LibreDB.2026) and align the login line; make the image-tag
  example version-agnostic; fix footer to say 'every main build' not 'release'.
- Gate the dockerhub-readme job on the token too: expose the build job's
  dockerhub_enabled output (which checks DOCKER_HUB_TOKEN) and require it in
  the job's if, so main stays green if the token is absent/rotated.
  (secrets can't be referenced directly in a job-level if.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Resolves CodeQL actions/unpinned-tag (#75) in this workflow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cevheri

cevheri commented Jun 14, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @copilot — addressed all review points:

  • Hardcoded passwords (DOCKERHUB.md quick start + login line): switched to change-me-* placeholders and reworded the login line to reference the env vars you set, with an explicit 'use your own strong secrets' note.
  • Stale tag example (0.9.15): made the image-tag row version-agnostic (X.Y.Z with a pull example).
  • Footer wording: now says synced on every main build (not 'release').
  • Job gating on the token: secrets can't be referenced in a job-level if:, so I exposed the build job's existing token check as a dockerhub_enabled output and gate dockerhub-readme on needs.build-and-push.outputs.dockerhub_enabled == 'true' and vars.DOCKER_HUB_USERNAME — main stays green if the token is absent/rotated.

Also resolved the CodeQL findings: #78 (missing permissions → added permissions: contents: read to the job) and #75 (pinned docker/setup-qemu-action to a SHA). Note: #76/#77 (unpinned-tag in npm-publish.yml) are pre-existing and out of scope for this PR.

@sonarqubecloud

Copy link
Copy Markdown

@cevheri cevheri merged commit ad65d5d into main Jun 14, 2026
11 checks passed
@cevheri cevheri deleted the ci/dockerhub-readme branch June 14, 2026 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants